
#include "stdafx.h"
#ifdef _SKEYMINI
#include "resource.h"
#include "VirtualSimple4.h"
#include "VARBinary.h"
#include "TimerUser.h"

CVirtualSimple4::CVirtualSimple4()
{
}

CVirtualSimple4::~CVirtualSimple4()
{
}

BOOL CVirtualSimple4::Create(CSKEYBid* pParentWnd)
{
	m_Owner = pParentWnd; return OnInitDialog();
}

void CVirtualSimple4::setCtrlShowWarning(bool bAutoDecode)
{
	CMainPanelGetter main(this); if (!main.hasPanel()) return;
	main.PostMainMessage(WM_PadSimple4_setCtrlShowWarning, bAutoDecode);
}

void CVirtualSimple4::setCtrlDescription(bool useAuto1, LPCWSTR *pDesc)
{
	CMainPanelGetter main(this); if (!main.hasPanel()) return;
	CVARBinary data;
	if (!data.appendInt((int)m_useAuto1)) return;
	for (intptr_t i = 0; i < 4; i++) if (!data.appendWSTR(pDesc ? pDesc[i] : nullptr)) return;
	main.sendMainCopyData(0, CPDT_PadSimple4_setCtrlDescription, data);
}

void CVirtualSimple4::setCtrlBidtmLeft(intptr_t lfSec)
{
	CMainPanelGetter main(this); if (!main.hasPanel()) return;
	main.PostMainMessage(WM_PadSimple4_setCtrlBidtmLeft, lfSec);
}

void CVirtualSimple4::setCtrlNowPlan(intptr_t planid)
{
	CMainPanelGetter main(this); if (!main.hasPanel()) return;
	main.PostMainMessage(WM_PadSimple4_setCtrlNowPlan, planid);
}

IMPLEMENT_VDLG_TIMER_EVENT(CVirtualSimple4)
{
	EVENT_CHECK_TIMER(m_timer, TimerPadSimple4 + 1);
	DoTimer();
}

#endif
